package com.ruoyi.animalManagement.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.animalManagement.mapper.LmisQuaRecordMapper;
import com.ruoyi.animalManagement.domain.LmisQuaRecord;
import com.ruoyi.animalManagement.service.ILmisQuaRecordService;

/**
 * 检疫纪录Service业务层处理
 * 
 * @author wj
 * @date 2025-08-18
 */
@Service
public class LmisQuaRecordServiceImpl implements ILmisQuaRecordService 
{
    @Autowired
    private LmisQuaRecordMapper lmisQuaRecordMapper;

    /**
     * 查询检疫纪录
     * 
     * @param quaRecordId 检疫纪录主键
     * @return 检疫纪录
     */
    @Override
    public LmisQuaRecord selectLmisQuaRecordByQuaRecordId(Long quaRecordId)
    {
        return lmisQuaRecordMapper.selectLmisQuaRecordByQuaRecordId(quaRecordId);
    }

    /**
     * 查询检疫纪录列表
     * 
     * @param lmisQuaRecord 检疫纪录
     * @return 检疫纪录
     */
    @Override
    public List<LmisQuaRecord> selectLmisQuaRecordList(LmisQuaRecord lmisQuaRecord)
    {
        return lmisQuaRecordMapper.selectLmisQuaRecordList(lmisQuaRecord);
    }

    /**
     * 新增检疫纪录
     * 
     * @param lmisQuaRecord 检疫纪录
     * @return 结果
     */
    @Override
    public int insertLmisQuaRecord(LmisQuaRecord lmisQuaRecord)
    {
        lmisQuaRecord.setCreateTime(DateUtils.getNowDate());
        lmisQuaRecord.setDelFlag("0");
        return lmisQuaRecordMapper.insertLmisQuaRecord(lmisQuaRecord);
    }

    /**
     * 修改检疫纪录
     * 
     * @param lmisQuaRecord 检疫纪录
     * @return 结果
     */
    @Override
    public int updateLmisQuaRecord(LmisQuaRecord lmisQuaRecord)
    {
        lmisQuaRecord.setUpdateTime(DateUtils.getNowDate());
        return lmisQuaRecordMapper.updateLmisQuaRecord(lmisQuaRecord);
    }

    /**
     * 批量删除检疫纪录
     * 
     * @param quaRecordIds 需要删除的检疫纪录主键
     * @return 结果
     */
    @Override
    public int deleteLmisQuaRecordByQuaRecordIds(Long[] quaRecordIds)
    {
        return lmisQuaRecordMapper.deleteLmisQuaRecordByQuaRecordIds(quaRecordIds);
    }

    /**
     * 删除检疫纪录信息
     * 
     * @param quaRecordId 检疫纪录主键
     * @return 结果
     */
    @Override
    public int deleteLmisQuaRecordByQuaRecordId(Long quaRecordId)
    {
        return lmisQuaRecordMapper.deleteLmisQuaRecordByQuaRecordId(quaRecordId);
    }
}
